﻿package emusic.ws 
{
	import flash.net.URLLoader;
	
	/**
	 * ...
	 * @author Martin Legris ( http://blog.martinlegris.com )
	 */
	public dynamic class RequestWrapper 
	{
		protected var _requestId:Number;
		protected var _method:String;		
		protected var _executed:Boolean;
		protected var _loader:URLLoader;
		protected var _errorCall:Function;
		protected var _successCall:Function;
		protected var _pagination:PaginationInfo;
		protected var _status:String;
		protected var _statusCode:Number;

		public function get requestId():Number { return _requestId; }		
		public function set requestId(value:Number):void { _requestId = value; }
		
		public function get method():String { return _method; }
		public function set method(value:String):void { _method = value; }
		
		public function get successFlag():Boolean { return _statusCode == 200; }		
		
		public function get executed():Boolean { return _executed; }
		public function set executed(value:Boolean):void { _executed = value; }
		
		public function get loader():URLLoader { return _loader; }
		public function set loader(value:URLLoader):void { _loader = value; }
		
		public function get errorCall():Function { return _errorCall; }
		public function set errorCall(value:Function):void { _errorCall = value; }
		
		public function get successCall():Function { return _successCall; }
		public function set successCall(value:Function):void { _successCall = value; }
		
		public function get status():String { return _status; }
		public function set status(value:String):void { _status = value; }
		
		public function get statusCode():Number { return _statusCode; }
		public function set statusCode(value:Number):void {  _statusCode = value; }
		
		public function get pagination():PaginationInfo { return _pagination; }
		public function set pagination(value:PaginationInfo):void { _pagination = value; }
	}
}